import request from '@/utils/request'

// 查询驱动列表
export function listPlugins(data) {
  return request({
    url: '/dvPlugin/page',
    method: 'post',
    data: data
  })
}

// 查询驱动详细
export function addPlugins(data) {
  return request({
    url: '/dvPlugin/add',
    method: 'post',
    data: data
  })
}

// 新增驱动
export function reqReleaseVersion(data) {
  return request({
    url: '/dvPlugin/upgrade',
    method: 'post',
    data: data
  })
}

// 修改驱动
export function reqHistoryVersion(pluginCode) {
  return request({
    url:`/dvPlugin/versionList/${pluginCode}`,
    method: 'get',
  })
}

// 删除驱动
export function delDrive(id) {
  return request({
    url: '/device/drive/' + id,
    method: 'delete'
  })
}
